Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/4299/improve offline support #4300

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

mahibi
Copy link
Collaborator

@mahibi mahibi commented Oct 1, 2024

resolve #4299

WIP!

🖼️ Screenshots

🏚️ Before 🏡 After
B A

🚧 TODO

  • analyze bug: sometimes chat messages are dropped from DB when navigating back to Conversation list. Check if this is caused by this PR or if it also happens on master or 20.0.2
  • check if lastReadMessageId or lastMessage.id should be used to compare with newest message from DB
  • update messages when push notification is received. Might need to move some logic from OfflineFirstChatRepository to ViewModel or a DomainModel so the Repository can also be used from NotificationWorker.

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@mahibi mahibi added the 2. developing Work in progress label Oct 1, 2024
@mahibi mahibi added this to the 20.1.0 milestone Oct 1, 2024
@mahibi mahibi self-assigned this Oct 1, 2024
@mahibi mahibi marked this pull request as draft October 1, 2024 14:03
…DB is not equal the lastReadMessage that is offered by the conversation

Signed-off-by: Marcel Hibbe <[email protected]>
delay progress bar for one second before showing up for slow connection

Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
@mahibi mahibi force-pushed the feature/4299/improveOfflineSupport branch from b1f9b9d to 4a41b13 Compare October 2, 2024 15:06
Signed-off-by: Marcel Hibbe <[email protected]>
make it possible to add any amount (up to 100) of messages to UI for initial loading.

add logging

Signed-off-by: Marcel Hibbe <[email protected]>
…adMessage from conversation

If conversation has a newer message id than DB then an online request is necessary

If conversation has an older message id than DB then an online request is not necessary (this could happen when updating of DB is implemented for push notification, not yet done).

If conversation has the same message id like DB than request can be skipped

Signed-off-by: Marcel Hibbe <[email protected]>
Copy link
Contributor

github-actions bot commented Oct 9, 2024

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4300-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

Copy link
Contributor

github-actions bot commented Oct 9, 2024

Codacy

Lint

TypemasterPR
Warnings9494
Errors132132

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1111
Dodgy code7979
Internationalization33
Malicious code vulnerability33
Performance66
Security11
Total109109

Lint increased!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve offline support
1 participant